<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PlPN::Recorder - The macro recorder object</title>
<link rel="stylesheet" href="../PlPN.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>

<body>


<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<li><a href="#events">EVENTS</a></li>
	<li><a href="#copyright_and_licence">COPYRIGHT and LICENCE</a></li>
</ul>

<hr name="index" />
</div>
<!-- INDEX END -->

<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>PlPN::Recorder - The macro recorder object</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
        {
                package MyRecorderWithUniqueClassName;
                use PlPN;
                our @ISA = qw(PlPN::Recorder);
                
                sub new {
                        my $class = shift;
                        my $self = $class-&gt;SUPER::new(@_);
                        # do something with $self
                        return $self;
                }
                
                sub RecordScintillaAction {
                        # do something
                }
                
                # etc.
        } # scope ends; return to original package
        
        use PlPN qw(PN);
        
        my $recorder = new MyRecorderWithUniqueClassName;
        PN-&gt;AddRecorder($recorder);
        
        # etc.</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Catches macro recording events from Programmer's Notepad.</p>
<p>The default constructor simply blesses an empty hashref into the class.</p>
<p>The default events do nothing; they exist so that derived classes can omit
them without causing Perl to crash when C++ code tries to call the event.</p>
<p>If you write a recorder, it is up to you to determine a format to store
actions in.</p>
<p><a href="../PlPN.html">PlPN</a> currently implements no default recorder, so if you want to
record and play back macros, you need to write your own.</p>
<p>
</p>
<hr />
<h1><a name="events">EVENTS</a></h1>
<dl>
<dt><strong><a name="recordscintillaaction" class="item">RecordScintillaAction($message, $wParam, $lParam)</a></strong></dt>

<dd>
<p>The default event called when a Scintilla action occurs; called only if
there isn't a more specific event. (Since there is only one other event,
this one gets called for most actions.)</p>
<p>See <a href="./Document.html#sendeditormessage">PlPN::Document::SendEditorMessage</a>.</p>
<p>Please note that in the current implementation all parameters are passed as
integers. Later versions will probably make necessary string conversions in
the XS code. For now, it is up to you to determine (based on the <code>$message</code>
whether a parameter is a string pointer and if it is, you must unpack the
pointer yourself.</p>
</dd>
<dt><strong><a name="recordsearchaction" class="item">RecordSearchAction($type, $options, $result);</a></strong></dt>

<dd>
<p>This event is called for search actions. <code>$type</code> is one of the search type
indicators exposed via the <code>:SearchType</code> tag in <a href="../PlPN.html">PlPN</a>. These
constants are:</p>
<dl>
<dt><strong><a name="stfindnext" class="item">stFindNext</a></strong></dt>

<dt><strong><a name="streplace" class="item">stReplace</a></strong></dt>

<dt><strong><a name="streplaceall" class="item">stReplaceAll</a></strong></dt>

</dl>
<p><code>$options</code> is a <a href="./SearchOptions.html">PlPN::SearchOptions</a> object.
<code>$result</code> is a <code>FindNextResult</code> indicator. (See
<a href="./Document.html#findnext">PlPN::Document::FindNext</a>.)</p>
</dd>
<dt><strong><a name="startrecording" class="item">StartRecording();</a></strong></dt>

<dd>
<p>This event is called when the user selects <code>Record Script</code> from the
Programmer's Notepad <code>Tools</code> menu. It is your signal to do any preparatory
work to get ready to record a macro.</p>
</dd>
<dt><strong><a name="stoprecording" class="item">StopRecording();</a></strong></dt>

<dd>
<p>This event is called when the user selects <code>Stop Recording</code> from the
Programmer's Notepad <code>Tools</code> menu. This is where you should format and
store your macro.</p>
</dd>
</dl>
<p>
</p>
<hr />
<h1><a name="copyright_and_licence">COPYRIGHT and LICENCE</a></h1>
<p>Copyright (c) 2012 Sean Healy. All rights reserved.</p>
<p>This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.</p>

</body>

</html>
